# def fun1():
#     a = 10
#     print(f"这是fun1a={a}")
#     def fun2():
#         a = 15
#         b = 10
#         return a + b
#     return fun2()
# res = fun1
# res()
# print(res())
"""
需求：
在旧功能上添加新功能不改变旧功能
"""
def old_fun():
    print("旧功能")
def new_fun(fun):
    def wrapper(fun):
        print("身份验证")
        fun()
    return wrapper(fun)
new_f = new_fun(old_fun)
new_f